#ifndef OGLAPP_H
#define OGLAPP_H

/*
 This class is the singleton object that controls the entire
 program. Each method will call various other classes from
 other cores to make a useable program.
 
 **Things to Fix**
 
 -TEMPORARY objects need removed when other cores are implemented.
 -TEST objects need to be either utilized or removed.
 -SDL needs to be implemented to eliminate GLUT callback functions
 -Update onEvent method (Requires SDL)
 -Update onUpdate method (Requires SDL)
 */

#include <iostream> 
#include <vector>
#include "CustomDataTypes.h"
#include "GraphicsObject.h"


class OGLApp
{
private:
    OGLApp(){rotationAngle = 0;}; //Constructor
    
    OGLApp(const OGLApp&); //Copy constructor
    OGLApp& operator = (const OGLApp &); //Assignment
    
    //TEST(Will go to scene manager) - vector to hold graphics objects for the update and render functions to read from.
    vector<GraphicsObject> mObjectList;
    
    //TEST(This is testing message types)
    vector<Message> mMessageList;
    
    
    //TEMPORARY - This is for testing until graphics core is finished
    double rotationAngle; //Stores the rotation angle of the primitive. 
    
    
    
public:
    ~OGLApp(); //Destructor
    static OGLApp* Instance(); //Creates an instance of the class
    
    //Add element to object list
    void addElement(GraphicsObject &object);
    
    //Remove element from object list
    void removeElement(GraphicsObject &object);
    
    //Draw the graphics to the screen.
    void drawGraphics(int num);
    
    //Functions for main game loop
    bool onInit();
    void onEvent();
    void onUpdate();
    void onRender();
    void onExit();
};

#endif